
import pytest
import os
from loguru import logger

test_data  = 'result'
test_report = 'report'

print("aaaasfsdfsdfsdfsdfsdfsdfsdfdsfsdfaaaa")

if __name__ == '__main__':

    logger.add('zentao.log')

    py_lst = [r'package_allure\test02_allure_class.py',r'package_allure\test01_allure_function.py','-sv','--alluredir',test_data]

    pytest.main(py_lst)

    # 2. 在python中运行allure命令
    cmd = "allure generate {} -o {} -c --encoding=GBK".format(test_data,test_report)
    os.system(cmd)

